← Back
Editing: gr_exit_state_action_on_member_expel.result
######################################################################### # 0) Setup group of 3 members (M1, M2 and M3). ######################################################################### include/group_replication.inc [rpl_server_count=3] Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. [connection server1] [connection server1] SET SESSION sql_log_bin = 0; CREATE TABLE pid_table(pid_no INT PRIMARY KEY); LOAD DATA LOCAL INFILE 'pid_file' INTO TABLE pid_table; DROP TABLE pid_table; call mtr.add_suppression("Member was expelled from the group due to network failures, changing member status to ERROR."); call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going."); call mtr.add_suppression("Fatal error during execution of Group Replication"); SET SESSION sql_log_bin = 1; ######################################################################### # 1) Force expel of member 1. ######################################################################### [connection server2] include/rpl_gr_wait_for_number_of_members.inc [connection server3] include/rpl_gr_wait_for_number_of_members.inc ######################################################################### # 1.1) Verify that member 1 went to super_read_only mode. ######################################################################### [connection server1] include/gr_wait_for_member_state.inc [connection server1] include/assert.inc [super_read_only should be enabled] include/stop_group_replication.inc ######################################################################### # 2) Set exit state action to ABORT_SERVER on member 1. ######################################################################### SET @@GLOBAL.group_replication_exit_state_action = ABORT_SERVER; include/start_group_replication.inc include/rpl_gr_wait_for_number_of_members.inc ######################################################################### # 3) Force expel again of member 1. ######################################################################### [connection server2] include/rpl_gr_wait_for_number_of_members.inc [connection server3] include/rpl_gr_wait_for_number_of_members.inc ######################################################################### # 3.1) Wait until server is aborted. ######################################################################### [connection server1] ######################################################################### # 4) Relaunch member 1. ######################################################################### include/rpl_reconnect.inc [connection server1] SET @@global.group_replication_group_seeds="GROUP_SEEDS_SERVER1"; SET @@global.group_replication_local_address="LOCAL_ADDRESS_SERVER1"; SET @@global.group_replication_ip_whitelist="GROUP_REPLICATION_GROUP_WHITELIST"; include/start_group_replication.inc include/rpl_gr_wait_for_number_of_members.inc ######################################################################### # 5) Cleanup. ######################################################################### include/group_replication_end.inc
Save File
Cancel